using System.Web.UI.WebControls;
using System.Web.UI;
using System.Drawing;

namespace CodeStory.WebControls
{
	public class PropertyGridRow : TableRow
	{
		private IPropertyEditor propertyEditor;
		private PropertyGridItem propertyGridItem;
		private bool hasChildRows;
		public IPropertyEditor PropertyEditor {
			get { return propertyEditor; }
			set { propertyEditor = value; }
		}
		public PropertyGridItem PropertyGridItem {
			get { return propertyGridItem; }
			set { propertyGridItem = value; }
		}
		public bool HasChildRows {
			get { return hasChildRows; }
			set { hasChildRows = value; }
		}
		protected override void AddAttributesToRender(HtmlTextWriter writer) {
			//if (HasChildRows) {
			//    writer.AddAttribute("onclick", "javascript:ToggleRowState(this);");
			//}
			writer.AddAttribute("__depth", PropertyGridItem.Depth.ToString());
			base.AddAttributesToRender(writer);
		}
	}
}